class CategoryInfo {
  List<CategoryItemInfo> data;

  CategoryInfo(this.data);

  factory CategoryInfo.fromJson(List json) {
    return CategoryInfo(json.map((i) => CategoryItemInfo.fromJson(i)).toList());
  }
}

class CategoryItemInfo {
  String mallCategoryId; //类别ID
  String mallCategoryName; //类别名称
  List<BxMallSubDto> bxMallSubDto; //不知道是啥
  String image; //图
  Null comments; //评论

  CategoryItemInfo(
      {this.mallCategoryId,
      this.mallCategoryName,
      this.bxMallSubDto,
      this.image,
      this.comments});

  factory CategoryItemInfo.fromJson(dynamic json) {
    var bmsd;
    if (json['bxMallSubDto'] != null) {
      bmsd = List<BxMallSubDto>();
      json['bxMallSubDto'].forEach((v) => bmsd.add(BxMallSubDto.fromJson(v)));
    }
    return CategoryItemInfo(
      mallCategoryId: json['mallCategoryId'],
      mallCategoryName: json['mallCategoryName'],
      bxMallSubDto: bmsd,
      image: json['image'],
      comments: json['comments'],
    );
  }
}

class BxMallSubDto {
  String mallSubId;
  String mallCategoryId;
  String mallSubName;
  String comments;

  BxMallSubDto(
      {this.mallSubId, this.mallCategoryId, this.mallSubName, this.comments});

  factory BxMallSubDto.fromJson(dynamic json) {
    return BxMallSubDto(
        mallSubId: json['mallSubId'],
        mallCategoryId: json['mallCategoryId'],
        mallSubName: json['mallSubName'],
        comments: json['comments']);
  }
}
